home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc263-src.lha / gcc-2.6.3 / gcc.info-7 (.txt) < prev    next >
GNU Info File  |  1994-11-23  |  51KB  |  955 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation,
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License," "Funding for
  13. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  14. included exactly as in the original, and provided that the entire
  15. resulting derived work is distributed under the terms of a permission
  16. notice identical to this one.
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that the sections entitled "GNU General Public
  20. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  21. `Look And Feel'", and this permission notice, may be included in
  22. translations approved by the Free Software Foundation instead of in the
  23. original English.
  24. File: gcc.info,  Node: VMS Install,  Next: Collect2,  Prev: Sun Install,  Up: Installation
  25. Installing GNU CC on VMS
  26. ========================
  27.    The VMS version of GNU CC is distributed in a backup saveset
  28. containing both source code and precompiled binaries.
  29.    To install the `gcc' command so you can use the compiler easily, in
  30. the same manner as you use the VMS C compiler, you must install the VMS
  31. CLD file for GNU CC as follows:
  32.   1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to
  33.      point to the directories where the GNU CC executables
  34.      (`gcc-cpp.exe', `gcc-cc1.exe', etc.) and the C include files are
  35.      kept respectively.  This should be done with the commands:
  36.           $ assign /system /translation=concealed -
  37.             disk:[gcc.] gnu_cc
  38.           $ assign /system /translation=concealed -
  39.             disk:[gcc.include.] gnu_cc_include
  40.      with the appropriate disk and directory names.  These commands can
  41.      be placed in your system startup file so they will be executed
  42.      whenever the machine is rebooted.  You may, if you choose, do this
  43.      via the `GCC_INSTALL.COM' script in the `[GCC]' directory.
  44.   2. Install the `GCC' command with the command line:
  45.           $ set command /table=sys$common:[syslib]dcltables -
  46.             /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc
  47.           $ install replace sys$common:[syslib]dcltables
  48.   3. To install the help file, do the following:
  49.           $ library/help sys$library:helplib.hlb gcc.hlp
  50.      Now you can invoke the compiler with a command like `gcc /verbose
  51.      file.c', which is equivalent to the command `gcc -v -c file.c' in
  52.      Unix.
  53.    If you wish to use GNU C++ you must first install GNU CC, and then
  54. perform the following steps:
  55.   1. Define the VMS logical name `GNU_GXX_INCLUDE' to point to the
  56.      directory where the preprocessor will search for the C++ header
  57.      files.  This can be done with the command:
  58.           $ assign /system /translation=concealed -
  59.             disk:[gcc.gxx_include.] gnu_gxx_include
  60.      with the appropriate disk and directory name.  If you are going to
  61.      be using libg++, this is where the libg++ install procedure will
  62.      install the libg++ header files.
  63.   2. Obtain the file `gcc-cc1plus.exe', and place this in the same
  64.      directory that `gcc-cc1.exe' is kept.
  65.      The GNU C++ compiler can be invoked with a command like `gcc /plus
  66.      /verbose file.cc', which is equivalent to the command `g++ -v -c
  67.      file.cc' in Unix.
  68.    We try to put corresponding binaries and sources on the VMS
  69. distribution tape.  But sometimes the binaries will be from an older
  70. version than the sources, because we don't always have time to update
  71. them.  (Use the `/version' option to determine the version number of
  72. the binaries and compare it with the source file `version.c' to tell
  73. whether this is so.)  In this case, you should use the binaries you get
  74. to recompile the sources.  If you must recompile, here is how:
  75.   1. Execute the command procedure `vmsconfig.com' to set up the files
  76.      `tm.h', `config.h', `aux-output.c', and `md.', and to create files
  77.      `tconfig.h' and `hconfig.h'.  This procedure also creates several
  78.      linker option files used by `make-cc1.com' and a data file used by
  79.      `make-l2.com'.
  80.           $ @vmsconfig.com
  81.   2. Setup the logical names and command tables as defined above.  In
  82.      addition, define the VMS logical name `GNU_BISON' to point at the
  83.      to the directories where the Bison executable is kept.  This
  84.      should be done with the command:
  85.           $ assign /system /translation=concealed -
  86.             disk:[bison.] gnu_bison
  87.      You may, if you choose, use the `INSTALL_BISON.COM' script in the
  88.      `[BISON]' directory.
  89.   3. Install the `BISON' command with the command line:
  90.           $ set command /table=sys$common:[syslib]dcltables -
  91.             /output=sys$common:[syslib]dcltables -
  92.             gnu_bison:[000000]bison
  93.           $ install replace sys$common:[syslib]dcltables
  94.   4. Type `@make-gcc' to recompile everything (alternatively, submit
  95.      the file `make-gcc.com' to a batch queue).  If you wish to build
  96.      the GNU C++ compiler as well as the GNU CC compiler, you must
  97.      first edit `make-gcc.com' and follow the instructions that appear
  98.      in the comments.
  99.   5. In order to use GCC, you need a library of functions which GCC
  100.      compiled code will call to perform certain tasks, and these
  101.      functions are defined in the file `libgcc2.c'.  To compile this
  102.      you should use the command procedure `make-l2.com', which will
  103.      generate the library `libgcc2.olb'.  `libgcc2.olb' should be built
  104.      using the compiler built from the same distribution that
  105.      `libgcc2.c' came from, and `make-gcc.com' will automatically do
  106.      all of this for you.
  107.      To install the library, use the following commands:
  108.           $ library gnu_cc:[000000]gcclib/delete=(new,eprintf)
  109.           $ library gnu_cc:[000000]gcclib/delete=L_*
  110.           $ library libgcc2/extract=*/output=libgcc2.obj
  111.           $ library gnu_cc:[000000]gcclib libgcc2.obj
  112.      The first command simply removes old modules that will be replaced
  113.      with modules from `libgcc2' under different module names.  The
  114.      modules `new' and `eprintf' may not actually be present in your
  115.      `gcclib.olb'--if the VMS librarian complains about those modules
  116.      not being present, simply ignore the message and continue on with
  117.      the next command.  The second command removes the modules that
  118.      came from the previous version of the library `libgcc2.c'.
  119.      Whenever you update the compiler on your system, you should also
  120.      update the library with the above procedure.
  121.   6. You may wish to build GCC in such a way that no files are written
  122.      to the directory where the source files reside.  An example would
  123.      be the when the source files are on a read-only disk.  In these
  124.      cases, execute the following DCL commands (substituting your
  125.      actual path names):
  126.           $ assign dua0:[gcc.build_dir.]/translation=concealed, -
  127.                    dua1:[gcc.source_dir.]/translation=concealed  gcc_build
  128.           $ set default gcc_build:[000000]
  129.      where the directory `dua1:[gcc.source_dir]' contains the source
  130.      code, and the directory `dua0:[gcc.build_dir]' is meant to contain
  131.      all of the generated object files and executables.  Once you have
  132.      done this, you can proceed building GCC as described above.  (Keep
  133.      in mind that `gcc_build' is a rooted logical name, and thus the
  134.      device names in each element of the search list must be an actual
  135.      physical device name rather than another rooted logical name).
  136.   7. *If you are building GNU CC with a previous version of GNU CC, you
  137.      also should check to see that you have the newest version of the
  138.      assembler*.  In particular, GNU CC version 2 treats global constant
  139.      variables slightly differently from GNU CC version 1, and GAS
  140.      version 1.38.1 does not have the patches required to work with GCC
  141.      version 2.  If you use GAS 1.38.1, then `extern const' variables
  142.      will not have the read-only bit set, and the linker will generate
  143.      warning messages about mismatched psect attributes for these
  144.      variables.  These warning messages are merely a nuisance, and can
  145.      safely be ignored.
  146.      If you are compiling with a version of GNU CC older than 1.33,
  147.      specify `/DEFINE=("inline=")' as an option in all the
  148.      compilations.  This requires editing all the `gcc' commands in
  149.      `make-cc1.com'.  (The older versions had problems supporting
  150.      `inline'.)  Once you have a working 1.33 or newer GNU CC, you can
  151.      change this file back.
  152.   8. If you want to build GNU CC with the VAX C compiler, you will need
  153.      to make minor changes in `make-cccp.com' and `make-cc1.com' to
  154.      choose alternate definitions of `CC', `CFLAGS', and `LIBS'.  See
  155.      comments in those files.  However, you must also have a working
  156.      version of the GNU assembler (GNU as, aka GAS) as it is used as
  157.      the back-end for GNU CC to produce binary object modules and is
  158.      not included in the GNU CC sources.  GAS is also needed to compile
  159.      `libgcc2' in order to build `gcclib' (see above); `make-l2.com'
  160.      expects to be able to find it operational in
  161.      `gnu_cc:[000000]gnu-as.exe'.
  162.      To use GNU CC on VMS, you need the VMS driver programs `gcc.exe',
  163.      `gcc.com', and `gcc.cld'.  They are distributed with the VMS
  164.      binaries (`gcc-vms') rather than the GNU CC sources.  GAS is also
  165.      included in `gcc-vms', as is Bison.
  166.      Once you have successfully built GNU CC with VAX C, you should use
  167.      the resulting compiler to rebuild itself.  Before doing this, be
  168.      sure to restore the `CC', `CFLAGS', and `LIBS' definitions in
  169.      `make-cccp.com' and `make-cc1.com'.  The second generation
  170.      compiler will be able to take advantage of many optimizations that
  171.      must be suppressed when building with other compilers.
  172.    Under previous versions of GNU CC, the generated code would
  173. occasionally give strange results when linked with the sharable
  174. `VAXCRTL' library.  Now this should work.
  175.    Even with this version, however, GNU CC itself should not be linked
  176. with the sharable `VAXCRTL'.  The version of `qsort' in `VAXCRTL' has a
  177. bug (known to be present in VMS versions V4.6 through V5.5) which
  178. causes the compiler to fail.
  179.    The executables are generated by `make-cc1.com' and `make-cccp.com'
  180. use the object library version of `VAXCRTL' in order to make use of the
  181. `qsort' routine in `gcclib.olb'.  If you wish to link the compiler
  182. executables with the shareable image version of `VAXCRTL', you should
  183. edit the file `tm.h' (created by `vmsconfig.com') to define the macro
  184. `QSORT_WORKAROUND'.
  185.    `QSORT_WORKAROUND' is always defined when GNU CC is compiled with
  186. VAX C, to avoid a problem in case `gcclib.olb' is not yet available.
  187. File: gcc.info,  Node: Collect2,  Next: Header Dirs,  Prev: VMS Install,  Up: Installation
  188. `collect2'
  189. ==========
  190.    Many target systems do not have support in the assembler and linker
  191. for "constructors"--initialization functions to be called before the
  192. official "start" of `main'.  On such systems, GNU CC uses a utility
  193. called `collect2' to arrange to call these functions at start time.
  194.    The program `collect2' works by linking the program once and looking
  195. through the linker output file for symbols with particular names
  196. indicating they are constructor functions.  If it finds any, it creates
  197. a new temporary `.c' file containing a table of them, compiles it, and
  198. links the program a second time including that file.
  199.    The actual calls to the constructors are carried out by a subroutine
  200. called `__main', which is called (automatically) at the beginning of
  201. the body of `main' (provided `main' was compiled with GNU CC).  Calling
  202. `__main' is necessary, even when compiling C code, to allow linking C
  203. and C++ object code together.  (If you use `-nostdlib', you get an
  204. unresolved reference to `__main', since it's defined in the standard
  205. GCC library.  Include `-lgcc' at the end of your compiler command line
  206. to resolve this reference.)
  207.    The program `collect2' is installed as `ld' in the directory where
  208. the passes of the compiler are installed.  When `collect2' needs to
  209. find the *real* `ld', it tries the following file names:
  210.    * `real-ld' in the directories listed in the compiler's search
  211.      directories.
  212.    * `real-ld' in the directories listed in the environment variable
  213.      `PATH'.
  214.    * The file specified in the `REAL_LD_FILE_NAME' configuration macro,
  215.      if specified.
  216.    * `ld' in the compiler's search directories, except that `collect2'
  217.      will not execute itself recursively.
  218.    * `ld' in `PATH'.
  219.    "The compiler's search directories" means all the directories where
  220. `gcc' searches for passes of the compiler.  This includes directories
  221. that you specify with `-B'.
  222.    Cross-compilers search a little differently:
  223.    * `real-ld' in the compiler's search directories.
  224.    * `TARGET-real-ld' in `PATH'.
  225.    * The file specified in the `REAL_LD_FILE_NAME' configuration macro,
  226.      if specified.
  227.    * `ld' in the compiler's search directories.
  228.    * `TARGET-ld' in `PATH'.
  229.    `collect2' explicitly avoids running `ld' using the file name under
  230. which `collect2' itself was invoked.  In fact, it remembers up a list
  231. of such names--in case one copy of `collect2' finds another copy (or
  232. version) of `collect2' installed as `ld' in a second place in the
  233. search path.
  234.    `collect2' searches for the utilities `nm' and `strip' using the
  235. same algorithm as above for `ld'.
  236. File: gcc.info,  Node: Header Dirs,  Prev: Collect2,  Up: Installation
  237. Standard Header File Directories
  238. ================================
  239.    `GCC_INCLUDE_DIR' means the same thing for native and cross.  It is
  240. where GNU CC stores its private include files, and also where GNU CC
  241. stores the fixed include files.  A cross compiled GNU CC runs
  242. `fixincludes' on the header files in `$(tooldir)/include'.  (If the
  243. cross compilation header files need to be fixed, they must be installed
  244. before GNU CC is built.  If the cross compilation header files are
  245. already suitable for ANSI C and GNU CC, nothing special need be done).
  246.    `GPLUS_INCLUDE_DIR' means the same thing for native and cross.  It
  247. is where `g++' looks first for header files.  `libg++' installs only
  248. target independent header files in that directory.
  249.    `LOCAL_INCLUDE_DIR' is used only for a native compiler.  It is
  250. normally `/usr/local/include'.  GNU CC searches this directory so that
  251. users can install header files in `/usr/local/include'.
  252.    `CROSS_INCLUDE_DIR' is used only for a cross compiler.  GNU CC
  253. doesn't install anything there.
  254.    `TOOL_INCLUDE_DIR' is used for both native and cross compilers.  It
  255. is the place for other packages to install header files that GNU CC will
  256. use.  For a cross-compiler, this is the equivalent of `/usr/include'.
  257. When you build a cross-compiler, `fixincludes' processes any header
  258. files in this directory.
  259. File: gcc.info,  Node: C Extensions,  Next: C++ Extensions,  Prev: Installation,  Up: Top
  260. Extensions to the C Language Family
  261. ***********************************
  262.    GNU C provides several language features not found in ANSI standard
  263. C.  (The `-pedantic' option directs GNU CC to print a warning message if
  264. any of these features is used.)  To test for the availability of these
  265. features in conditional compilation, check for a predefined macro
  266. `__GNUC__', which is always defined under GNU CC.
  267.    These extensions are available in C and Objective C.  Most of them
  268. are also available in C++.  *Note Extensions to the C++ Language: C++
  269. Extensions, for extensions that apply *only* to C++.
  270. * Menu:
  271. * Statement Exprs::     Putting statements and declarations inside expressions.
  272. * Local Labels::        Labels local to a statement-expression.
  273. * Labels as Values::    Getting pointers to labels, and computed gotos.
  274. * Nested Functions::    As in Algol and Pascal, lexical scoping of functions.
  275. * Constructing Calls::    Dispatching a call to another function.
  276. * Naming Types::        Giving a name to the type of some expression.
  277. * Typeof::              `typeof': referring to the type of an expression.
  278. * Lvalues::             Using `?:', `,' and casts in lvalues.
  279. * Conditionals::        Omitting the middle operand of a `?:' expression.
  280. * Long Long::        Double-word integers--`long long int'.
  281. * Complex::             Data types for complex numbers.
  282. * Zero Length::         Zero-length arrays.
  283. * Variable Length::     Arrays whose length is computed at run time.
  284. * Macro Varargs::    Macros with variable number of arguments.
  285. * Subscripting::        Any array can be subscripted, even if not an lvalue.
  286. * Pointer Arith::       Arithmetic on `void'-pointers and function pointers.
  287. * Initializers::        Non-constant initializers.
  288. * Constructors::        Constructor expressions give structures, unions
  289.                          or arrays as values.
  290. * Labeled Elements::    Labeling elements of initializers.
  291. * Cast to Union::       Casting to union type from any member of the union.
  292. * Case Ranges::        `case 1 ... 9' and such.
  293. * Function Attributes:: Declaring that functions have no side effects,
  294.                          or that they can never return.
  295. * Function Prototypes:: Prototype declarations and old-style definitions.
  296. * Dollar Signs::        Dollar sign is allowed in identifiers.
  297. * Character Escapes::   `\e' stands for the character ESC.
  298. * Variable Attributes::    Specifying attributes of variables.
  299. * Alignment::           Inquiring about the alignment of a type or variable.
  300. * Inline::              Defining inline functions (as fast as macros).
  301. * Extended Asm::        Assembler instructions with C expressions as operands.
  302.                          (With them you can define "built-in" functions.)
  303. * Asm Labels::          Specifying the assembler name to use for a C symbol.
  304. * Explicit Reg Vars::   Defining variables residing in specified registers.
  305. * Alternate Keywords::  `__const__', `__asm__', etc., for header files.
  306. * Incomplete Enums::    `enum foo;', with details to follow.
  307. * Function Names::    Printable strings which are the name of the current
  308.              function.
  309. File: gcc.info,  Node: Statement Exprs,  Next: Local Labels,  Up: C Extensions
  310. Statements and Declarations in Expressions
  311. ==========================================
  312.    A compound statement enclosed in parentheses may appear as an
  313. expression in GNU C.  This allows you to use loops, switches, and local
  314. variables within an expression.
  315.    Recall that a compound statement is a sequence of statements
  316. surrounded by braces; in this construct, parentheses go around the
  317. braces.  For example:
  318.      ({ int y = foo (); int z;
  319.         if (y > 0) z = y;
  320.         else z = - y;
  321.         z; })
  322. is a valid (though slightly more complex than necessary) expression for
  323. the absolute value of `foo ()'.
  324.    The last thing in the compound statement should be an expression
  325. followed by a semicolon; the value of this subexpression serves as the
  326. value of the entire construct.  (If you use some other kind of statement
  327. last within the braces, the construct has type `void', and thus
  328. effectively no value.)
  329.    This feature is especially useful in making macro definitions "safe"
  330. (so that they evaluate each operand exactly once).  For example, the
  331. "maximum" function is commonly defined as a macro in standard C as
  332. follows:
  333.      #define max(a,b) ((a) > (b) ? (a) : (b))
  334. But this definition computes either A or B twice, with bad results if
  335. the operand has side effects.  In GNU C, if you know the type of the
  336. operands (here let's assume `int'), you can define the macro safely as
  337. follows:
  338.      #define maxint(a,b) \
  339.        ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
  340.    Embedded statements are not allowed in constant expressions, such as
  341. the value of an enumeration constant, the width of a bit field, or the
  342. initial value of a static variable.
  343.    If you don't know the type of the operand, you can still do this,
  344. but you must use `typeof' (*note Typeof::.) or type naming (*note
  345. Naming Types::.).
  346. File: gcc.info,  Node: Local Labels,  Next: Labels as Values,  Prev: Statement Exprs,  Up: C Extensions
  347. Locally Declared Labels
  348. =======================
  349.    Each statement expression is a scope in which "local labels" can be
  350. declared.  A local label is simply an identifier; you can jump to it
  351. with an ordinary `goto' statement, but only from within the statement
  352. expression it belongs to.
  353.    A local label declaration looks like this:
  354.      __label__ LABEL;
  355.      __label__ LABEL1, LABEL2, ...;
  356.    Local label declarations must come at the beginning of the statement
  357. expression, right after the `({', before any ordinary declarations.
  358.    The label declaration defines the label *name*, but does not define
  359. the label itself.  You must do this in the usual way, with `LABEL:',
  360. within the statements of the statement expression.
  361.    The local label feature is useful because statement expressions are
  362. often used in macros.  If the macro contains nested loops, a `goto' can
  363. be useful for breaking out of them.  However, an ordinary label whose
  364. scope is the whole function cannot be used: if the macro can be
  365. expanded several times in one function, the label will be multiply
  366. defined in that function.  A local label avoids this problem.  For
  367. example:
  368.      #define SEARCH(array, target)                     \
  369.      ({                                               \
  370.        __label__ found;                                \
  371.        typeof (target) _SEARCH_target = (target);      \
  372.        typeof (*(array)) *_SEARCH_array = (array);     \
  373.        int i, j;                                       \
  374.        int value;                                      \
  375.        for (i = 0; i < max; i++)                       \
  376.          for (j = 0; j < max; j++)                     \
  377.            if (_SEARCH_array[i][j] == _SEARCH_target)  \
  378.              { value = i; goto found; }              \
  379.        value = -1;                                     \
  380.       found:                                           \
  381.        value;                                          \
  382.      })
  383. File: gcc.info,  Node: Labels as Values,  Next: Nested Functions,  Prev: Local Labels,  Up: C Extensions
  384. Labels as Values
  385. ================
  386.    You can get the address of a label defined in the current function
  387. (or a containing function) with the unary operator `&&'.  The value has
  388. type `void *'.  This value is a constant and can be used wherever a
  389. constant of that type is valid.  For example:
  390.      void *ptr;
  391.      ...
  392.      ptr = &&foo;
  393.    To use these values, you need to be able to jump to one.  This is
  394. done with the computed goto statement(1), `goto *EXP;'.  For example,
  395.      goto *ptr;
  396. Any expression of type `void *' is allowed.
  397.    One way of using these constants is in initializing a static array
  398. that will serve as a jump table:
  399.      static void *array[] = { &&foo, &&bar, &&hack };
  400.    Then you can select a label with indexing, like this:
  401.      goto *array[i];
  402. Note that this does not check whether the subscript is in bounds--array
  403. indexing in C never does that.
  404.    Such an array of label values serves a purpose much like that of the
  405. `switch' statement.  The `switch' statement is cleaner, so use that
  406. rather than an array unless the problem does not fit a `switch'
  407. statement very well.
  408.    Another use of label values is in an interpreter for threaded code.
  409. The labels within the interpreter function can be stored in the
  410. threaded code for super-fast dispatching.
  411.    You can use this mechanism to jump to code in a different function.
  412. If you do that, totally unpredictable things will happen.  The best way
  413. to avoid this is to store the label address only in automatic variables
  414. and never pass it as an argument.
  415.    ---------- Footnotes ----------
  416.    (1)  The analogous feature in Fortran is called an assigned goto,
  417. but that name seems inappropriate in C, where one can do more than
  418. simply store label addresses in label variables.
  419. File: gcc.info,  Node: Nested Functions,  Next: Constructing Calls,  Prev: Labels as Values,  Up: C Extensions
  420. Nested Functions
  421. ================
  422.    A "nested function" is a function defined inside another function.
  423. (Nested functions are not supported for GNU C++.)  The nested function's
  424. name is local to the block where it is defined.  For example, here we
  425. define a nested function named `square', and call it twice:
  426.      foo (double a, double b)
  427.      {
  428.        double square (double z) { return z * z; }
  429.      
  430.        return square (a) + square (b);
  431.      }
  432.    The nested function can access all the variables of the containing
  433. function that are visible at the point of its definition.  This is
  434. called "lexical scoping".  For example, here we show a nested function
  435. which uses an inherited variable named `offset':
  436.      bar (int *array, int offset, int size)
  437.      {
  438.        int access (int *array, int index)
  439.          { return array[index + offset]; }
  440.        int i;
  441.        ...
  442.        for (i = 0; i < size; i++)
  443.          ... access (array, i) ...
  444.      }
  445.    Nested function definitions are permitted within functions in the
  446. places where variable definitions are allowed; that is, in any block,
  447. before the first statement in the block.
  448.    It is possible to call the nested function from outside the scope of
  449. its name by storing its address or passing the address to another
  450. function:
  451.      hack (int *array, int size)
  452.      {
  453.        void store (int index, int value)
  454.          { array[index] = value; }
  455.      
  456.        intermediate (store, size);
  457.      }
  458.    Here, the function `intermediate' receives the address of `store' as
  459. an argument.  If `intermediate' calls `store', the arguments given to
  460. `store' are used to store into `array'.  But this technique works only
  461. so long as the containing function (`hack', in this example) does not
  462. exit.
  463.    If you try to call the nested function through its address after the
  464. containing function has exited, all hell will break loose.  If you try
  465. to call it after a containing scope level has exited, and if it refers
  466. to some of the variables that are no longer in scope, you may be lucky,
  467. but it's not wise to take the risk.  If, however, the nested function
  468. does not refer to anything that has gone out of scope, you should be
  469. safe.
  470.    GNU CC implements taking the address of a nested function using a
  471. technique called "trampolines".  A paper describing them is available
  472. from `maya.idiap.ch' in directory `pub/tmb', file `usenix88-lexic.ps.Z'.
  473.    A nested function can jump to a label inherited from a containing
  474. function, provided the label was explicitly declared in the containing
  475. function (*note Local Labels::.).  Such a jump returns instantly to the
  476. containing function, exiting the nested function which did the `goto'
  477. and any intermediate functions as well.  Here is an example:
  478.      bar (int *array, int offset, int size)
  479.      {
  480.        __label__ failure;
  481.        int access (int *array, int index)
  482.          {
  483.            if (index > size)
  484.              goto failure;
  485.            return array[index + offset];
  486.          }
  487.        int i;
  488.        ...
  489.        for (i = 0; i < size; i++)
  490.          ... access (array, i) ...
  491.        ...
  492.        return 0;
  493.      
  494.       /* Control comes here from `access'
  495.          if it detects an error.  */
  496.       failure:
  497.        return -1;
  498.      }
  499.    A nested function always has internal linkage.  Declaring one with
  500. `extern' is erroneous.  If you need to declare the nested function
  501. before its definition, use `auto' (which is otherwise meaningless for
  502. function declarations).
  503.      bar (int *array, int offset, int size)
  504.      {
  505.        __label__ failure;
  506.        auto int access (int *, int);
  507.        ...
  508.        int access (int *array, int index)
  509.          {
  510.            if (index > size)
  511.              goto failure;
  512.            return array[index + offset];
  513.          }
  514.        ...
  515.      }
  516. File: gcc.info,  Node: Constructing Calls,  Next: Naming Types,  Prev: Nested Functions,  Up: C Extensions
  517. Constructing Function Calls
  518. ===========================
  519.    Using the built-in functions described below, you can record the
  520. arguments a function received, and call another function with the same
  521. arguments, without knowing the number or types of the arguments.
  522.    You can also record the return value of that function call, and
  523. later return that value, without knowing what data type the function
  524. tried to return (as long as your caller expects that data type).
  525. `__builtin_apply_args ()'
  526.      This built-in function returns a pointer of type `void *' to data
  527.      describing how to perform a call with the same arguments as were
  528.      passed to the current function.
  529.      The function saves the arg pointer register, structure value
  530.      address, and all registers that might be used to pass arguments to
  531.      a function into a block of memory allocated on the stack.  Then it
  532.      returns the address of that block.
  533. `__builtin_apply (FUNCTION, ARGUMENTS, SIZE)'
  534.      This built-in function invokes FUNCTION (type `void (*)()') with a
  535.      copy of the parameters described by ARGUMENTS (type `void *') and
  536.      SIZE (type `int').
  537.      The value of ARGUMENTS should be the value returned by
  538.      `__builtin_apply_args'.  The argument SIZE specifies the size of
  539.      the stack argument data, in bytes.
  540.      This function returns a pointer of type `void *' to data describing
  541.      how to return whatever value was returned by FUNCTION.  The data
  542.      is saved in a block of memory allocated on the stack.
  543.      It is not always simple to compute the proper value for SIZE.  The
  544.      value is used by `__builtin_apply' to compute the amount of data
  545.      that should be pushed on the stack and copied from the incoming
  546.      argument area.
  547. `__builtin_return (RESULT)'
  548.      This built-in function returns the value described by RESULT from
  549.      the containing function.  You should specify, for RESULT, a value
  550.      returned by `__builtin_apply'.
  551. File: gcc.info,  Node: Naming Types,  Next: Typeof,  Prev: Constructing Calls,  Up: C Extensions
  552. Naming an Expression's Type
  553. ===========================
  554.    You can give a name to the type of an expression using a `typedef'
  555. declaration with an initializer.  Here is how to define NAME as a type
  556. name for the type of EXP:
  557.      typedef NAME = EXP;
  558.    This is useful in conjunction with the statements-within-expressions
  559. feature.  Here is how the two together can be used to define a safe
  560. "maximum" macro that operates on any arithmetic type:
  561.      #define max(a,b) \
  562.        ({typedef _ta = (a), _tb = (b);  \
  563.          _ta _a = (a); _tb _b = (b);     \
  564.          _a > _b ? _a : _b; })
  565.    The reason for using names that start with underscores for the local
  566. variables is to avoid conflicts with variable names that occur within
  567. the expressions that are substituted for `a' and `b'.  Eventually we
  568. hope to design a new form of declaration syntax that allows you to
  569. declare variables whose scopes start only after their initializers;
  570. this will be a more reliable way to prevent such conflicts.
  571. File: gcc.info,  Node: Typeof,  Next: Lvalues,  Prev: Naming Types,  Up: C Extensions
  572. Referring to a Type with `typeof'
  573. =================================
  574.    Another way to refer to the type of an expression is with `typeof'.
  575. The syntax of using of this keyword looks like `sizeof', but the
  576. construct acts semantically like a type name defined with `typedef'.
  577.    There are two ways of writing the argument to `typeof': with an
  578. expression or with a type.  Here is an example with an expression:
  579.      typeof (x[0](1))
  580. This assumes that `x' is an array of functions; the type described is
  581. that of the values of the functions.
  582.    Here is an example with a typename as the argument:
  583.      typeof (int *)
  584. Here the type described is that of pointers to `int'.
  585.    If you are writing a header file that must work when included in
  586. ANSI C programs, write `__typeof__' instead of `typeof'.  *Note
  587. Alternate Keywords::.
  588.    A `typeof'-construct can be used anywhere a typedef name could be
  589. used.  For example, you can use it in a declaration, in a cast, or
  590. inside of `sizeof' or `typeof'.
  591.    * This declares `y' with the type of what `x' points to.
  592.           typeof (*x) y;
  593.    * This declares `y' as an array of such values.
  594.           typeof (*x) y[4];
  595.    * This declares `y' as an array of pointers to characters:
  596.           typeof (typeof (char *)[4]) y;
  597.      It is equivalent to the following traditional C declaration:
  598.           char *y[4];
  599.      To see the meaning of the declaration using `typeof', and why it
  600.      might be a useful way to write, let's rewrite it with these macros:
  601.           #define pointer(T)  typeof(T *)
  602.           #define array(T, N) typeof(T [N])
  603.      Now the declaration can be rewritten this way:
  604.           array (pointer (char), 4) y;
  605.      Thus, `array (pointer (char), 4)' is the type of arrays of 4
  606.      pointers to `char'.
  607. File: gcc.info,  Node: Lvalues,  Next: Conditionals,  Prev: Typeof,  Up: C Extensions
  608. Generalized Lvalues
  609. ===================
  610.    Compound expressions, conditional expressions and casts are allowed
  611. as lvalues provided their operands are lvalues.  This means that you
  612. can take their addresses or store values into them.
  613.    Standard C++ allows compound expressions and conditional expressions
  614. as lvalues, and permits casts to reference type, so use of this
  615. extension is deprecated for C++ code.
  616.    For example, a compound expression can be assigned, provided the last
  617. expression in the sequence is an lvalue.  These two expressions are
  618. equivalent:
  619.      (a, b) += 5
  620.      a, (b += 5)
  621.    Similarly, the address of the compound expression can be taken.
  622. These two expressions are equivalent:
  623.      &(a, b)
  624.      a, &b
  625.    A conditional expression is a valid lvalue if its type is not void
  626. and the true and false branches are both valid lvalues.  For example,
  627. these two expressions are equivalent:
  628.      (a ? b : c) = 5
  629.      (a ? b = 5 : (c = 5))
  630.    A cast is a valid lvalue if its operand is an lvalue.  A simple
  631. assignment whose left-hand side is a cast works by converting the
  632. right-hand side first to the specified type, then to the type of the
  633. inner left-hand side expression.  After this is stored, the value is
  634. converted back to the specified type to become the value of the
  635. assignment.  Thus, if `a' has type `char *', the following two
  636. expressions are equivalent:
  637.      (int)a = 5
  638.      (int)(a = (char *)(int)5)
  639.    An assignment-with-arithmetic operation such as `+=' applied to a
  640. cast performs the arithmetic using the type resulting from the cast,
  641. and then continues as in the previous case.  Therefore, these two
  642. expressions are equivalent:
  643.      (int)a += 5
  644.      (int)(a = (char *)(int) ((int)a + 5))
  645.    You cannot take the address of an lvalue cast, because the use of its
  646. address would not work out coherently.  Suppose that `&(int)f' were
  647. permitted, where `f' has type `float'.  Then the following statement
  648. would try to store an integer bit-pattern where a floating point number
  649. belongs:
  650.      *&(int)f = 1;
  651.    This is quite different from what `(int)f = 1' would do--that would
  652. convert 1 to floating point and store it.  Rather than cause this
  653. inconsistency, we think it is better to prohibit use of `&' on a cast.
  654.    If you really do want an `int *' pointer with the address of `f',
  655. you can simply write `(int *)&f'.
  656. File: gcc.info,  Node: Conditionals,  Next: Long Long,  Prev: Lvalues,  Up: C Extensions
  657. Conditionals with Omitted Operands
  658. ==================================
  659.    The middle operand in a conditional expression may be omitted.  Then
  660. if the first operand is nonzero, its value is the value of the
  661. conditional expression.
  662.    Therefore, the expression
  663.      x ? : y
  664. has the value of `x' if that is nonzero; otherwise, the value of `y'.
  665.    This example is perfectly equivalent to
  666.      x ? x : y
  667. In this simple case, the ability to omit the middle operand is not
  668. especially useful.  When it becomes useful is when the first operand
  669. does, or may (if it is a macro argument), contain a side effect.  Then
  670. repeating the operand in the middle would perform the side effect
  671. twice.  Omitting the middle operand uses the value already computed
  672. without the undesirable effects of recomputing it.
  673. File: gcc.info,  Node: Long Long,  Next: Complex,  Prev: Conditionals,  Up: C Extensions
  674. Double-Word Integers
  675. ====================
  676.    GNU C supports data types for integers that are twice as long as
  677. `long int'.  Simply write `long long int' for a signed integer, or
  678. `unsigned long long int' for an unsigned integer.  To make an integer
  679. constant of type `long long int', add the suffix `LL' to the integer.
  680. To make an integer constant of type `unsigned long long int', add the
  681. suffix `ULL' to the integer.
  682.    You can use these types in arithmetic like any other integer types.
  683. Addition, subtraction, and bitwise boolean operations on these types
  684. are open-coded on all types of machines.  Multiplication is open-coded
  685. if the machine supports fullword-to-doubleword a widening multiply
  686. instruction.  Division and shifts are open-coded only on machines that
  687. provide special support.  The operations that are not open-coded use
  688. special library routines that come with GNU CC.
  689.    There may be pitfalls when you use `long long' types for function
  690. arguments, unless you declare function prototypes.  If a function
  691. expects type `int' for its argument, and you pass a value of type `long
  692. long int', confusion will result because the caller and the subroutine
  693. will disagree about the number of bytes for the argument.  Likewise, if
  694. the function expects `long long int' and you pass `int'.  The best way
  695. to avoid such problems is to use prototypes.
  696. File: gcc.info,  Node: Complex,  Next: Zero Length,  Prev: Long Long,  Up: C Extensions
  697. Complex Numbers
  698. ===============
  699.    GNU C supports complex data types.  You can declare both complex
  700. integer types and complex floating types, using the keyword
  701. `__complex__'.
  702.    For example, `__complex__ double x;' declares `x' as a variable
  703. whose real part and imaginary part are both of type `double'.
  704. `__complex__ short int y;' declares `y' to have real and imaginary
  705. parts of type `short int'; this is not likely to be useful, but it
  706. shows that the set of complex types is complete.
  707.    To write a constant with a complex data type, use the suffix `i' or
  708. `j' (either one; they are equivalent).  For example, `2.5fi' has type
  709. `__complex__ float' and `3i' has type `__complex__ int'.  Such a
  710. constant always has a pure imaginary value, but you can form any
  711. complex value you like by adding one to a real constant.
  712.    To extract the real part of a complex-valued expression EXP, write
  713. `__real__ EXP'.  Likewise, use `__imag__' to extract the imaginary part.
  714.    The operator `~' performs complex conjugation when used on a value
  715. with a complex type.
  716.    GNU CC can allocate complex automatic variables in a noncontiguous
  717. fashion; it's even possible for the real part to be in a register while
  718. the imaginary part is on the stack (or vice-versa).  None of the
  719. supported debugging info formats has a way to represent noncontiguous
  720. allocation like this, so GNU CC describes a noncontiguous complex
  721. variable as if it were two separate variables of noncomplex type.  If
  722. the variable's actual name is `foo', the two fictitious variables are
  723. named `foo$real' and `foo$imag'.  You can examine and set these two
  724. fictitious variables with your debugger.
  725.    A future version of GDB will know how to recognize such pairs and
  726. treat them as a single variable with a complex type.
  727. File: gcc.info,  Node: Zero Length,  Next: Variable Length,  Prev: Complex,  Up: C Extensions
  728. Arrays of Length Zero
  729. =====================
  730.    Zero-length arrays are allowed in GNU C.  They are very useful as
  731. the last element of a structure which is really a header for a
  732. variable-length object:
  733.      struct line {
  734.        int length;
  735.        char contents[0];
  736.      };
  737.      
  738.      {
  739.        struct line *thisline = (struct line *)
  740.          malloc (sizeof (struct line) + this_length);
  741.        thisline->length = this_length;
  742.      }
  743.    In standard C, you would have to give `contents' a length of 1, which
  744. means either you waste space or complicate the argument to `malloc'.
  745. File: gcc.info,  Node: Variable Length,  Next: Macro Varargs,  Prev: Zero Length,  Up: C Extensions
  746. Arrays of Variable Length
  747. =========================
  748.    Variable-length automatic arrays are allowed in GNU C.  These arrays
  749. are declared like any other automatic arrays, but with a length that is
  750. not a constant expression.  The storage is allocated at the point of
  751. declaration and deallocated when the brace-level is exited.  For
  752. example:
  753.      FILE *
  754.      concat_fopen (char *s1, char *s2, char *mode)
  755.      {
  756.        char str[strlen (s1) + strlen (s2) + 1];
  757.        strcpy (str, s1);
  758.        strcat (str, s2);
  759.        return fopen (str, mode);
  760.      }
  761.    Jumping or breaking out of the scope of the array name deallocates
  762. the storage.  Jumping into the scope is not allowed; you get an error
  763. message for it.
  764.    You can use the function `alloca' to get an effect much like
  765. variable-length arrays.  The function `alloca' is available in many
  766. other C implementations (but not in all).  On the other hand,
  767. variable-length arrays are more elegant.
  768.    There are other differences between these two methods.  Space
  769. allocated with `alloca' exists until the containing *function* returns.
  770. The space for a variable-length array is deallocated as soon as the
  771. array name's scope ends.  (If you use both variable-length arrays and
  772. `alloca' in the same function, deallocation of a variable-length array
  773. will also deallocate anything more recently allocated with `alloca'.)
  774.    You can also use variable-length arrays as arguments to functions:
  775.      struct entry
  776.      tester (int len, char data[len][len])
  777.      {
  778.        ...
  779.      }
  780.    The length of an array is computed once when the storage is allocated
  781. and is remembered for the scope of the array in case you access it with
  782. `sizeof'.
  783.    If you want to pass the array first and the length afterward, you can
  784. use a forward declaration in the parameter list--another GNU extension.
  785.      struct entry
  786.      tester (int len; char data[len][len], int len)
  787.      {
  788.        ...
  789.      }
  790.    The `int len' before the semicolon is a "parameter forward
  791. declaration", and it serves the purpose of making the name `len' known
  792. when the declaration of `data' is parsed.
  793.    You can write any number of such parameter forward declarations in
  794. the parameter list.  They can be separated by commas or semicolons, but
  795. the last one must end with a semicolon, which is followed by the "real"
  796. parameter declarations.  Each forward declaration must match a "real"
  797. declaration in parameter name and data type.
  798. File: gcc.info,  Node: Macro Varargs,  Next: Subscripting,  Prev: Variable Length,  Up: C Extensions
  799. Macros with Variable Numbers of Arguments
  800. =========================================
  801.    In GNU C, a macro can accept a variable number of arguments, much as
  802. a function can.  The syntax for defining the macro looks much like that
  803. used for a function.  Here is an example:
  804.      #define eprintf(format, args...)  \
  805.       fprintf (stderr, format , ## args)
  806.    Here `args' is a "rest argument": it takes in zero or more
  807. arguments, as many as the call contains.  All of them plus the commas
  808. between them form the value of `args', which is substituted into the
  809. macro body where `args' is used.  Thus, we have this expansion:
  810.      eprintf ("%s:%d: ", input_file_name, line_number)
  811.      ==>
  812.      fprintf (stderr, "%s:%d: " , input_file_name, line_number)
  813. Note that the comma after the string constant comes from the definition
  814. of `eprintf', whereas the last comma comes from the value of `args'.
  815.    The reason for using `##' is to handle the case when `args' matches
  816. no arguments at all.  In this case, `args' has an empty value.  In this
  817. case, the second comma in the definition becomes an embarrassment: if
  818. it got through to the expansion of the macro, we would get something
  819. like this:
  820.      fprintf (stderr, "success!\n" , )
  821. which is invalid C syntax.  `##' gets rid of the comma, so we get the
  822. following instead:
  823.      fprintf (stderr, "success!\n")
  824.    This is a special feature of the GNU C preprocessor: `##' before a
  825. rest argument that is empty discards the preceding sequence of
  826. non-whitespace characters from the macro definition.  (If another macro
  827. argument precedes, none of it is discarded.)
  828.    It might be better to discard the last preprocessor token instead of
  829. the last preceding sequence of non-whitespace characters; in fact, we
  830. may someday change this feature to do so.  We advise you to write the
  831. macro definition so that the preceding sequence of non-whitespace
  832. characters is just a single token, so that the meaning will not change
  833. if we change the definition of this feature.
  834. File: gcc.info,  Node: Subscripting,  Next: Pointer Arith,  Prev: Macro Varargs,  Up: C Extensions
  835. Non-Lvalue Arrays May Have Subscripts
  836. =====================================
  837.    Subscripting is allowed on arrays that are not lvalues, even though
  838. the unary `&' operator is not.  For example, this is valid in GNU C
  839. though not valid in other C dialects:
  840.      struct foo {int a[4];};
  841.      
  842.      struct foo f();
  843.      
  844.      bar (int index)
  845.      {
  846.        return f().a[index];
  847.      }
  848. File: gcc.info,  Node: Pointer Arith,  Next: Initializers,  Prev: Subscripting,  Up: C Extensions
  849. Arithmetic on `void'- and Function-Pointers
  850. ===========================================
  851.    In GNU C, addition and subtraction operations are supported on
  852. pointers to `void' and on pointers to functions.  This is done by
  853. treating the size of a `void' or of a function as 1.
  854.    A consequence of this is that `sizeof' is also allowed on `void' and
  855. on function types, and returns 1.
  856.    The option `-Wpointer-arith' requests a warning if these extensions
  857. are used.
  858. File: gcc.info,  Node: Initializers,  Next: Constructors,  Prev: Pointer Arith,  Up: C Extensions
  859. Non-Constant Initializers
  860. =========================
  861.    As in standard C++, the elements of an aggregate initializer for an
  862. automatic variable are not required to be constant expressions in GNU C.
  863. Here is an example of an initializer with run-time varying elements:
  864.      foo (float f, float g)
  865.      {
  866.        float beat_freqs[2] = { f-g, f+g };
  867.        ...
  868.      }
  869. File: gcc.info,  Node: Constructors,  Next: Labeled Elements,  Prev: Initializers,  Up: C Extensions
  870. Constructor Expressions
  871. =======================
  872.    GNU C supports constructor expressions.  A constructor looks like a
  873. cast containing an initializer.  Its value is an object of the type
  874. specified in the cast, containing the elements specified in the
  875. initializer.
  876.    Usually, the specified type is a structure.  Assume that `struct
  877. foo' and `structure' are declared as shown:
  878.      struct foo {int a; char b[2];} structure;
  879. Here is an example of constructing a `struct foo' with a constructor:
  880.      structure = ((struct foo) {x + y, 'a', 0});
  881. This is equivalent to writing the following:
  882.      {
  883.        struct foo temp = {x + y, 'a', 0};
  884.        structure = temp;
  885.      }
  886.    You can also construct an array.  If all the elements of the
  887. constructor are (made up of) simple constant expressions, suitable for
  888. use in initializers, then the constructor is an lvalue and can be
  889. coerced to a pointer to its first element, as shown here:
  890.      char **foo = (char *[]) { "x", "y", "z" };
  891.    Array constructors whose elements are not simple constants are not
  892. very useful, because the constructor is not an lvalue.  There are only
  893. two valid ways to use it: to subscript it, or initialize an array
  894. variable with it.  The former is probably slower than a `switch'
  895. statement, while the latter does the same thing an ordinary C
  896. initializer would do.  Here is an example of subscripting an array
  897. constructor:
  898.      output = ((int[]) { 2, x, 28 }) [input];
  899.    Constructor expressions for scalar types and union types are is also
  900. allowed, but then the constructor expression is equivalent to a cast.
  901. File: gcc.info,  Node: Labeled Elements,  Next: Cast to Union,  Prev: Constructors,  Up: C Extensions
  902. Labeled Elements in Initializers
  903. ================================
  904.    Standard C requires the elements of an initializer to appear in a
  905. fixed order, the same as the order of the elements in the array or
  906. structure being initialized.
  907.    In GNU C you can give the elements in any order, specifying the array
  908. indices or structure field names they apply to.  This extension is not
  909. implemented in GNU C++.
  910.    To specify an array index, write `[INDEX]' or `[INDEX] =' before the
  911. element value.  For example,
  912.      int a[6] = { [4] 29, [2] = 15 };
  913. is equivalent to
  914.      int a[6] = { 0, 0, 15, 0, 29, 0 };
  915. The index values must be constant expressions, even if the array being
  916. initialized is automatic.
  917.    To initialize a range of elements to the same value, write `[FIRST
  918. ... LAST] = VALUE'.  For example,
  919.      int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
  920. Note that the length of the array is the highest value specified plus
  921.    In a structure initializer, specify the name of a field to initialize
  922. with `FIELDNAME:' before the element value.  For example, given the
  923. following structure,
  924.      struct point { int x, y; };
  925. the following initialization
  926.      struct point p = { y: yvalue, x: xvalue };
  927. is equivalent to
  928.      struct point p = { xvalue, yvalue };
  929.    Another syntax which has the same meaning is `.FIELDNAME ='., as
  930. shown here:
  931.      struct point p = { .y = yvalue, .x = xvalue };
  932.    You can also use an element label (with either the colon syntax or
  933. the period-equal syntax) when initializing a union, to specify which
  934. element of the union should be used.  For example,
  935.      union foo { int i; double d; };
  936.      
  937.      union foo f = { d: 4 };
  938. will convert 4 to a `double' to store it in the union using the second
  939. element.  By contrast, casting 4 to type `union foo' would store it
  940. into the union as the integer `i', since it is an integer.  (*Note Cast
  941. to Union::.)
  942.    You can combine this technique of naming elements with ordinary C
  943. initialization of successive elements.  Each initializer element that
  944. does not have a label applies to the next consecutive element of the
  945. array or structure.  For example,
  946.      int a[6] = { [1] = v1, v2, [4] = v4 };
  947. is equivalent to
  948.      int a[6] = { 0, v1, v2, 0, v4, 0 };
  949.    Labeling the elements of an array initializer is especially useful
  950. when the indices are characters or belong to an `enum' type.  For
  951. example:
  952.      int whitespace[256]
  953.        = { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
  954.            ['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
  955.